package com.chj.gaoji.class02;

public class Code05_Nim {
// https://blog.csdn.net/u010321471/article/details/84773683
//	https://www.shuzhiduo.com/A/nAJv6genJr/
	// 保证arr是正数数组
	public static void printWinner(int[] arr) {
		int eor = 0;
		for (int num : arr) {
			eor ^= num;
		}
		if (eor == 0) {
			System.out.println("后手赢");
		} else {
			System.out.println("先手赢");
		}
	}

	public static void main(String[] args) {
//		Alice先行动
//		Bob后手
		int[] arr1 = { 3, 2, 1 };
		printWinner(arr1);
	}

}